﻿BoxSportSystem.pagosList = (function () {

    var viewModel = kendo.observable({
        pagosDataSource: {},
        criterio:"",
        buscar: function (e) {
            onShow();
        },
        pagos: {},
        selectedPago: function (e) {
            this.set("pagos", e.data);
        }
    });

    function onShow() {
        var criterio = viewModel.get("criterio");

        $.ajax({
            url: BoxSportSystem.config.urlServicePagos + "?criterio=" + criterio,
            dataType: "json",
            success: function (data) {
                viewModel.set("pagosDataSource", data);
            }
        });
    }


    return {
        viewModel: viewModel,
        onShow: onShow
        
    };
    
})(window);